/*
 * Environment.cpp
 *
 *  Created on: 09.08.2012
 *      Author: Caffeine
 */

#include "Environment.h"
#include "../log/Log.h"

namespace irr {
namespace core {

irr::IrrlichtDevice*device=0;

void Environment::setDevice(irr::IrrlichtDevice*d){
	device=d;
}

irr::IrrlichtDevice*Environment::getDevice(){
	if (!device){
		LOGE("device is NULL");
		exit(0);
	}
	return device;
}

irr::gui::IGUIEnvironment*Environment::getGUIEnvironment(){
	return getDevice()->getGUIEnvironment();
}
irr::io::IFileSystem*Environment::getFileSystem(){
	return getDevice()->getFileSystem();
}
irr::video::IVideoDriver*Environment::getDriver(){
	return getDevice()->getVideoDriver();
}
irr::scene::ISceneManager*Environment::getSMGR(){
	return getDevice()->getSceneManager();
}

} /* namespace core */
} /* namespace irr */
